<?php


namespace backend\modules\tool\helpers\widgets;
use backend\modules\tool\helpers\Common;
use Yii;

use yii\base\Widget;

class UploadImages extends Widget
{
    public $filed;
    public $model;
    public $max=3;
    public $default="/dsj_wjjkq_tlz_show/backend/web/img/widget/upload.png";
    public $defalut_url;
    public $title;
    public function run()
    {
        $this->defalut_url=Yii::$app->getHomeUrl()."?r=tool/upload/img";
        $this->default=Common::GetWebPath()."img/widget/upload.png";
//        parent::run(); // TODO: Change the autogenerated stub
        return $this->render("uploadimages",[
            "name"=>$this->model->formName()."[".$this->filed."][]",
            "default_url"=>$this->defalut_url,
            "default"=>$this->default,
            "max"=>$this->max,
            "filed"=>$this->filed,
            'model'=>$this->model,
            'title'=>$this->title
        ]);
    }
}